print ( '=' * 60 )

for row in range ( 1, 10 ):
    for col in range ( 9, 0,-1 ):
        if col>row:
            print(' '*8,end=' ')
        else:
            print ( '{}*{}={:<4}'.format(col, row, col*row ) , end=' ' )
    print ( '' )

print ( '' )
print ( '=' * 60 )

for row in range ( 9, 0,-1 ):
    for col in range ( 9, 0,-1 ):
        if col>row:
            print(' '*8,end=' ')
        else:
            print ( '{}*{}={:<4}'.format(col, row, col*row ) , end=' ' )
    print ( '' )

